/*
 * @(#)MaintDmsGroupRoleFolderForm.java
 *
 * Copyright (c) 2003 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of DCIVision
 * Ltd ("Confidential Information").  You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with DCIVision Ltd.
 */
package com.dcivision.dms.web;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;

import com.dcivision.dms.bean.DmsObjectHomeFolder;
import com.dcivision.framework.ApplicationException;
import com.dcivision.framework.TextUtility;
import com.dcivision.framework.bean.AbstractBaseObject;
import com.dcivision.framework.web.AbstractActionForm;


/**
  MaintDmsGroupRoleFolderForm.java

  This class is the for web form purpose.

  @author          Jenny Li
  @company         DCIVision Limited
  @creation date   23/11/2004
  @version         $Revision: 1.2 $
*/

public class MaintDmsGroupRoleFolderForm extends AbstractActionForm {

  public static final String REVISION = "$Revision: 1.2 $";

  private String documentID = null;
  private String memberID = null;
  private String memberType = null;
  private String itemStatus = null;
  private String userGroupID = null;
  private String userRoleID = null;
  private String targetRootID=null;
  private String destinationID=null;
  private String rootID=null;
  private String parentID=null;
  private String destinationPath=null;
  private String memberName=null;

  public MaintDmsGroupRoleFolderForm() {
    super();
  }

  public String getDocumentID() { 
    return(this.documentID);
  }

  public void setDocumentID(String documentID) { 
    this.documentID = documentID;
  }

  public String getMemberID() { 
    return(this.memberID);
  }

  public void setMemberID(String memberID) { 
    this.memberID = memberID;
  }

  public String getMemberType() { 
    return(this.memberType);
  }

  public void setMemberType(String memberType) { 
    this.memberType = memberType;
  }

  public String getItemStatus() { 
    return(this.itemStatus);
  }

  public void setItemStatus(String itemStatus) { 
    this.itemStatus = itemStatus;
  }
  
  public String getUserGroupID(){
    return(this.userGroupID); 
  }
  
  public void setUserGroupID(String userGroupID){
    this.userGroupID=userGroupID; 
  }
  
  public String getUserRoleID(){
    return(this.userRoleID); 
  }
  
  public void setUserRoleID(String userRoleID){
    this.userRoleID=userRoleID; 
  }
  
  public String getTargetRootID(){
    return(this.targetRootID); 
  }
  
  public void setTargetRootID(String targetRootID){
    this.targetRootID=targetRootID; 
  }
  
  public String getDestinationID(){
    return(this.destinationID); 
  }
  
  public void setDestinationID(String destinationID){
    this.destinationID=destinationID;
  }
  
  public String getRootID(){
    return(this.rootID); 
  }
  
  public void setRootID(String rootID){
    this.rootID=rootID; 
  }
  
  public String getParentID(){
    return(this.parentID);
  }
  
  public void setParentID(String parentID){
    this.parentID=parentID; 
  }
  
  public void setDestinationPath(String destinationPath) {
    this.destinationPath = destinationPath;
  }

  public String getDestinationPath() {
    return destinationPath;
  }
  
  public void setMemberName(String memberName) {
    this.memberName = memberName;
  }

  public String getMemberName() {
    return memberName;
  }
  
  public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
    return super.validate(mapping, request);
  }
  
  public void reset(ActionMapping mapping, HttpServletRequest request) {
    super.reset(mapping, request);
    this.setID(null);
    this.setDocumentID(null);
    this.setMemberID(null);
    this.setMemberType(null);
    this.setMemberName(null);
    this.setItemStatus(null);
    this.setRecordStatus(null);
    this.setUpdateCount(null);
    this.setCreatorID(null);
    this.setCreateDate(null);
    this.setUpdaterID(null);
    this.setUpdateDate(null);
  }

  public AbstractBaseObject getFormData() throws ApplicationException {
    DmsObjectHomeFolder tmpDmsObjectHomeFolder = new DmsObjectHomeFolder();
    tmpDmsObjectHomeFolder.setID(TextUtility.parseIntegerObj(this.getID()));
    tmpDmsObjectHomeFolder.setDocumentID(TextUtility.parseIntegerObj(this.getDocumentID()));
    tmpDmsObjectHomeFolder.setMemberID(TextUtility.parseIntegerObj(this.getMemberID()));
    tmpDmsObjectHomeFolder.setMemberType(this.getMemberType());
    tmpDmsObjectHomeFolder.setMemberName(this.memberName);
    tmpDmsObjectHomeFolder.setItemStatus(this.getItemStatus());
    tmpDmsObjectHomeFolder.setRecordStatus(this.getRecordStatus());
    tmpDmsObjectHomeFolder.setUpdateCount(TextUtility.parseIntegerObj(this.getUpdateCount()));
    tmpDmsObjectHomeFolder.setCreatorID(TextUtility.parseIntegerObj(this.getCreatorID()));
    tmpDmsObjectHomeFolder.setCreateDate(parseTimestamp(this.getCreateDate()));
    tmpDmsObjectHomeFolder.setUpdaterID(TextUtility.parseIntegerObj(this.getUpdaterID()));
    tmpDmsObjectHomeFolder.setUpdateDate(parseTimestamp(this.getUpdateDate()));
    return tmpDmsObjectHomeFolder;
  }

  public void setFormData(AbstractBaseObject baseObj) throws ApplicationException {
    DmsObjectHomeFolder tmpDmsObjectHomeFolder = (DmsObjectHomeFolder)baseObj;
    this.setID(TextUtility.formatIntegerObj(tmpDmsObjectHomeFolder.getID()));
    this.setDocumentID(TextUtility.formatIntegerObj(tmpDmsObjectHomeFolder.getDocumentID()));
    this.setMemberID(TextUtility.formatIntegerObj(tmpDmsObjectHomeFolder.getMemberID()));
    this.setMemberType(tmpDmsObjectHomeFolder.getMemberType());
    this.setMemberName(tmpDmsObjectHomeFolder.getMemberName());
    this.setItemStatus(tmpDmsObjectHomeFolder.getItemStatus());
    this.setRecordStatus(tmpDmsObjectHomeFolder.getRecordStatus());
    this.setUpdateCount(TextUtility.formatIntegerObj(tmpDmsObjectHomeFolder.getUpdateCount()));
    this.setCreatorID(TextUtility.formatIntegerObj(tmpDmsObjectHomeFolder.getCreatorID()));
    this.setCreateDate(formatTimestamp(tmpDmsObjectHomeFolder.getCreateDate()));
    this.setUpdaterID(TextUtility.formatIntegerObj(tmpDmsObjectHomeFolder.getUpdaterID()));
    this.setUpdateDate(formatTimestamp(tmpDmsObjectHomeFolder.getUpdateDate()));
  }

  
}
